{include file="pageheader_erp.htm"}

<link href="styles/erp_order.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/calendar.php?lang={$cfg_lang}"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
{insert_scripts files="../js/jquery.1.3.2.js"}
{insert_scripts files="../js/jquery.blockUI.2.23.js"}


{include file="erp_account_payable_search.htm"}

<style type="text/css">
	.current_page_style
	{
		color:red;
		font-weight:bold;
	}
	
</style>

<script language="JavaScript">
	$(document).ready(function(){
		$("span[id^='order_sn_']").css('cursor','pointer');
		$("span[id^='order_sn_']").mouseover(function(){
			$(this).css('color','red');
		});
		$("span[id^='order_sn_']").mouseout(function(){
			$(this).css('color','black');
		});	
		$("span[id^='order_sn_']").click(function(){
			var this_id=$(this).attr('id');
			var order_id=this_id.substr('order_sn_'.length,this_id.length-'order_sn_'.length);
			var open_url='erp_order_manage.php?act=view_order&order_id='+order_id;
			window.open(open_url,'_blank');	
		});	

		$("span[id^='supplier_']").css('cursor','pointer');
		$("span[id^='supplier_']").mouseover(function(){
			$(this).css('color','red');
		});
		$("span[id^='supplier_']").mouseout(function(){
			$(this).css('color','black');
		});	
		$("span[id^='supplier_']").click(function(){
			var this_id=$(this).attr('id');
			var sub_str=this_id.substr('supplier_'.length,this_id.length-'supplier_'.length);
			var pos_underline=sub_str.search('_');
			var supplier_code=sub_str.substr(pos_underline+1,sub_str.length-pos_underline-1);
			var open_url='erp_supplier.php?act=list&supplier_code='+supplier_code;

			window.open(open_url,'_blank');	
		});			
				
	});
	
</script>

 <!-- start payable list -->
 <div class="list-div" id="listDiv">
<table  cellpadding="3" cellspacing="1">
  <tr>
	<th width="10%">{$lang.erp_payable_order_supplier}</th>
	<th width="10%">{$lang.erp_payable_total_payable_amount}</th>
	<th width="10%">{$lang.erp_payable_total_paid_amount}</th>
	<th width="10%">{$lang.erp_payable_payable}</th>
  </tr>
  {foreach from=$payable_info item=payable key=okey}
  <tr>
	<td><a href="erp_order_manage.php?act=order_list&s_id={$payable.id}" target="main-frame">{$okey}</a></td>
	<td align="center">{$payable.unpaid}</td>
	<td align="center">{$payable.paid}</td>
	<td align="center"><span style="{if $payable.remind gt 0}color:red;font-weight:bold;{else}color:blue;font-weight:bold;{/if}">{$payable.remind}</span></td>
  </tr> 
  {foreachelse}
  <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
  {/foreach}
   <tr><td colspan="10" align="right">{$page}</td></tr> 
</table>
</div>
<!-- end payable list -->


{include file="pagefooter.htm"}

